//
//  ZWLSingerViewController.m
//  ZWLMusic
//
//  Created by dllo on 16/1/6.
//  Copyright © 2016年 ZKJ. All rights reserved.
//

#import "ZWLSingerViewController.h"

@interface ZWLSingerViewController ()<UITableViewDataSource,UITableViewDelegate>
@property (nonatomic,strong)UITableView *tableView;
@property (nonatomic,strong)NSArray *array;
@end

@implementation ZWLSingerViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    
    self.tableView = [[UITableView alloc]initWithFrame:self.view.bounds style:UITableViewStyleGrouped];
    [self.view addSubview:self.tableView];
    [self.tableView registerClass:[UITableViewCell class] forCellReuseIdentifier:@"UITableViewIdentifier"];
    self.tableView.delegate = self;
    self.tableView.dataSource = self;
    
    self.array = [[NSArray alloc]initWithObjects:@"华语男歌手", @"华语女歌手", @"华语组合", @"欧美男歌手", @"欧美女歌手", @"欧美组合", @"日韩男歌手", @"日韩女歌手", @"日韩组合", nil];
    
    
    
}

#pragma mark UITableViewDelegate
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
    return self.array.count;
}

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"UITableViewIdentifier"];
    cell.textLabel.text = self.array[indexPath.row];
    cell.textLabel.textAlignment = NSTextAlignmentCenter;
    return  cell;
}

- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
    return 100;
}

-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
    ZWLDetailViewController *DetailVC = [[ZWLDetailViewController alloc]init];
    NSArray *array = @[kChinaManGetURL, kChinaWomanGetURL, kChinaGroupGetURL, kAmericanManGetURL, kAmericanWoManGetURL, kAmericanGroupGetURL, kKoranManGetURL, kKoranWoManGetURL, kKoranGroupGetURL];
    DetailVC.url = array[indexPath.row];
    [self.navigationController pushViewController:DetailVC animated:YES];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
